package main;
import java.util.ArrayList;


public class Table {
	ArrayList<Field> fields;
	String tablename;
	
	public Table(String tablename) {
		fields = new ArrayList<Field>();
		this.tablename = tablename;
	}
	public void add(Field f){
		fields.add(f);
	}
	public Field get(int i){
		return fields.get(i);
	}
	
	public String toString(){
		String ret = tablename + ":\n\t\t";
		for (int i=0; i<fields.size(); i++){
			ret+=fields.get(i) + "\n\t\t ";
		}
		return ret;
		
	}
	public String getTablename() {
		return tablename;
	}
	public int getFieldsNum() {
		// TODO Auto-generated method stub
		return fields.size();
	}
	
}
